package com.example.bsxk.dto;


public class ZyxBaseResponse {
    private String code;
    private String message;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("BaseResponse{");
        sb.append("code='").append(code).append('\'');
        sb.append(", message='").append(message).append('\'');
        sb.append('}');
        return sb.toString();
    }


    public static  ZyxBaseResponse success(){
        ZyxBaseResponse response = new ZyxBaseResponse();
        response.setCode("0");
        response.setMessage("操作成功！");

        return response;
    }

    public static  ZyxBaseResponse fail2001(){
        ZyxBaseResponse response = new ZyxBaseResponse();
        response.setCode("2001");
        response.setMessage("学生已被其他老师选定！");
        return response;
    }
}
